home *** CD-ROM | disk | FTP | other *** search
/ New Masters of Flash / New Masters of Flash.iso / pc / MOVIES / 16.dir / 00282_Text_text19.txt < prev    next >
Text File  |  2000-10-01  |  1KB  |  18 lines

  1. Add two blank frames at frame 3 and frame 4 on the ActionScript layer. Give frame 3 the label name mainloop. In frame 4 add the following ActionScript:
  2.  
  3. gotoAndPlay (ΓÇ£mainloopΓÇ¥);
  4.  
  5. So now once the movie starts it will get caught in a loop until the user clicks on one of the wireframe buttons. Cool, eh?
  6.  
  7. Anyway, on Frame 5 of the ActionScript layer add yet another blank key frame, and give the new frame the label wait. This is where the movie jumps to when they click on one of the buttons.
  8. After the code is done running we need the movie to jump back to the main loop, so in frame 24 of the ActionScript layer add a blank frame and this command:
  9.  
  10. gotoAndPlay (ΓÇ£mainloopΓÇ¥);
  11.  
  12. If youΓÇÖre feeling adventurous, you could add this to mean that if theyΓÇÖve scored less than eight, they go back to the main loop to continue playing, but if they have reached eight,they jump to a You Win screen:
  13.  
  14. if (/:score = 8) {
  15.    gotoAndStop(ΓÇ£youwinΓÇ¥);
  16.   }else{
  17.    gotoAndPlay(ΓÇ£mainloopΓÇ¥);
  18. }